import time

from selenium import webdriver
import pytest
from selenium.webdriver.common.by import By

from .Input import Input
from .canvas import Canvas


def test_map_click():
    browser = webdriver.Chrome()
    browser.maximize_window()
    browser.get("https://echarts.apache.org/examples/zh/editor.html?c=map-HK")
    try:
        canvas = Canvas(browser, '//div[@id="chart-panel"]//canvas', By.XPATH)
        canvas.click('50', '50')
    finally:
        pass
        # browser.close()
    time.sleep(5)

